package com.zzp.zjs_bos.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.zzp.zjs_bos.dao.IUserDao;
import com.zzp.zjs_bos.dao.base.BaseDaoImpl;
import com.zzp.zjs_bos.domain.User;

@Repository
public class UserDaoImpl extends BaseDaoImpl<User> implements IUserDao {

	public User findByUserName(String username) {
		String hql = "from User where username=?";
		List list = this.getHibernateTemplate().find(hql, username);
		if(list.size() >0 && list != null){
			User user = (User) list.get(0);
			return user;
		}
		return null;
	}

}
